//
//  ViewController.m
//  YLNetworkingFrame
//
//  Created by Topsun on 16/5/31.
//  Copyright © 2016年 tcl. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@property(nonatomic , strong)AProjectNetRequest    * request;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.request.isSerialize = NO;
    [self.request.parameterEntity.postDictionary setValue:@(1) forKey:@"page"];
    [NWS sendRequest:self.request resultBlock:^(AFNetRequest *netRequest, AFNetResponse *netResponse, NSError *error) {
        if (netResponse.resultCode == kRequestSuccess && error == nil) {
            
            
        }else{
            // 请求失败
        }
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(AProjectNetRequest *)request
{
    if (_request == nil)
    {
        _request = [[AProjectNetRequest alloc] init];
        _request.requestTypeKey = @"xWindowList";
    }
    return _request;
}

@end
